package pt.isec.a21210392.a21190220.ludotwist.GameLogic;

import java.io.Serializable;
import java.util.ArrayList;


public class Board implements Serializable
{
	private static final long serialVersionUID = 1L;
	private static ArrayList<House> board;
	
	public Board()
	{	
		board = new ArrayList<House>();
		
		board.add(new EmptyHouse(0, 0, 10));
		board.add(new EmptyHouse(1, 1, 10));
		board.add(new EmptyHouse(2, 2, 10));
		board.add(new GoToBeginHouse(3, 3, 10));
		board.add(new EmptyHouse(4, 4, 10));
		board.add(new EmptyHouse(5, 5, 10));
		board.add(new GoForwardHouse(6, 6, 10));
		board.add(new EmptyHouse(7, 7, 10));
		board.add(new EmptyHouse(8, 8, 11));
		board.add(new GoToEndHouse(9, 8, 12, "GREEN"));
		board.add(new EmptyHouse(10, 8, 13));
		board.add(new EmptyHouse(11, 8, 14));
		board.add(new EmptyHouse(12, 8, 15));
		board.add(new GoBackHouse(13, 8, 16));
		board.add(new EmptyHouse(14, 8, 17));
		board.add(new EmptyHouse(15, 8, 18));
		board.add(new ThrowDiceHouse(16, 9, 18));
		board.add(new EmptyHouse(17, 10, 18));
		board.add(new EmptyHouse(18, 10, 17));
		board.add(new EmptyHouse(19, 10, 16));
		board.add(new GoToBeginHouse(20, 10, 15));
		board.add(new EmptyHouse(21, 10, 14));
		board.add(new EmptyHouse(22, 10, 13));
		board.add(new GoForwardHouse(23, 10, 12));
		board.add(new EmptyHouse(24, 10, 11));
		board.add(new EmptyHouse(25, 11, 10));
		board.add(new GoToEndHouse(26, 12, 10, "RED"));
		board.add(new EmptyHouse(27, 13, 10));
		board.add(new EmptyHouse(28, 14, 10));
		board.add(new EmptyHouse(29, 15, 10));
		board.add(new GoBackHouse(30, 16, 10));
		board.add(new EmptyHouse(31, 17, 10));
		board.add(new EmptyHouse(32, 18, 10));
		board.add(new ThrowDiceHouse(33, 18, 9));
		board.add(new EmptyHouse(34, 18, 8));
		board.add(new EmptyHouse(35, 17, 8));
		board.add(new EmptyHouse(36, 16, 8));
		board.add(new GoToBeginHouse(37, 15, 8));
		board.add(new EmptyHouse(38, 14, 8));
		board.add(new EmptyHouse(39, 13, 8));
		board.add(new GoForwardHouse(40, 12, 8));
		board.add(new EmptyHouse(41, 11, 8));
		board.add(new EmptyHouse(42, 10, 7));
		board.add(new GoToEndHouse(43, 10, 6, "BLUE"));
		board.add(new EmptyHouse(44, 10, 5));
		board.add(new EmptyHouse(45, 10, 4));
		board.add(new EmptyHouse(46, 10, 3));
		board.add(new GoBackHouse(47, 10, 2));
		board.add(new EmptyHouse(48, 10, 1));
		board.add(new EmptyHouse(49, 10, 0));
		board.add(new ThrowDiceHouse(50, 9, 0));
		board.add(new EmptyHouse(51, 8, 0));
		board.add(new EmptyHouse(52, 8, 1));
		board.add(new EmptyHouse(53, 8, 2));
		board.add(new GoToBeginHouse(54, 8, 3));
		board.add(new EmptyHouse(55, 8, 4));
		board.add(new EmptyHouse(56, 8, 5));		
		board.add(new GoForwardHouse(57, 8, 6));
		board.add(new EmptyHouse(58, 8, 7));
		board.add(new EmptyHouse(59, 7, 8));		
		board.add(new GoToEndHouse(60, 6, 8, "YELLOW"));
		board.add(new EmptyHouse(61, 5, 8));
		board.add(new EmptyHouse(62, 4, 8));
		board.add(new EmptyHouse(63, 3, 8));
		board.add(new GoBackHouse(64, 2, 8));
		board.add(new EmptyHouse(65, 1, 8));
		board.add(new EmptyHouse(66, 0, 8));
		board.add(new ThrowDiceHouse(67, 0, 9));
		board.add(new EmptyHouse(68, 1, 9));
		board.add(new EmptyHouse(69, 2, 9));
		board.add(new EmptyHouse(70, 3, 9));
		board.add(new EmptyHouse(71, 4, 9));
		board.add(new EmptyHouse(72, 5, 9));
		board.add(new EmptyHouse(73, 6, 9));
		board.add(new EmptyHouse(74, 7, 9));		
		board.add(new FinishHouse(75, 8, 9));
		board.add(new EmptyHouse(76, 9, 17));
		board.add(new EmptyHouse(77, 9, 16));
		board.add(new EmptyHouse(78, 9, 15));
		board.add(new EmptyHouse(79, 9, 14));
		board.add(new EmptyHouse(80, 9, 13));
		board.add(new EmptyHouse(81, 9, 12));
		board.add(new EmptyHouse(82, 9, 11));
		board.add(new FinishHouse(83, 9, 10));
		board.add(new EmptyHouse(84, 17, 9));
		board.add(new EmptyHouse(85, 16, 9));
		board.add(new EmptyHouse(86, 15, 9));
		board.add(new EmptyHouse(87, 14, 9));
		board.add(new EmptyHouse(88, 13, 9));
		board.add(new EmptyHouse(89, 12, 9));
		board.add(new EmptyHouse(90, 11, 9));
		board.add(new FinishHouse(91, 10, 9));
		board.add(new EmptyHouse(92, 9, 1));
		board.add(new EmptyHouse(93, 9, 2));
		board.add(new EmptyHouse(94, 9, 3));
		board.add(new EmptyHouse(95, 9, 4));
		board.add(new EmptyHouse(96, 9, 5));
		board.add(new EmptyHouse(97, 9, 6));
		board.add(new EmptyHouse(98, 9, 7));
		board.add(new FinishHouse(99, 9, 8));
		
		board.add(new StartHouse(100, 2.5, 14.5));
		board.add(new StartHouse(101, 3.5, 15.5));
		board.add(new StartHouse(102, 4.5, 14.5));
		board.add(new StartHouse(103, 3.5, 13.5));
		
		board.add(new StartHouse(104, 13.5, 14.5));
		board.add(new StartHouse(105, 14.5, 15.5));
		board.add(new StartHouse(106, 15.5, 14.5));
		board.add(new StartHouse(107, 14.5, 13.5));

		board.add(new StartHouse(108, 13.5, 3.5));
		board.add(new StartHouse(109, 14.5, 4.5));
		board.add(new StartHouse(110, 15.5, 3.5));
		board.add(new StartHouse(111, 14.5, 2.5));

		board.add(new StartHouse(112, 2.5, 3.5));
		board.add(new StartHouse(113, 3.5, 4.5));
		board.add(new StartHouse(114, 4.5, 3.5));
		board.add(new StartHouse(115, 3.5, 2.5));
	}
	
	public House getHouse(int pos)
	{
		return board.get(pos);
	}
}
